<?php
    session_start();
    include('top.php');
    include('../sql.php');
    $log = "select * from admin_log order by time desc";
    $log_result = $link->query($log);
?>
<div class="home-container-body">
    <?php include('nav.php'); ?>
</div>

<div class="admin_hone-content">
    <table width="100%">
        <tr>
            <th>管理员ID</th>
            <th>登入时间</th>
            <th>登入IP</th>
        </tr>
        <?php while($log_row = mysqli_fetch_array($log_result)) { ?>
        <tr>
            <td>
                <?php echo $log_row['uid']; ?>
            </td>
            <td>
                <?php echo date("Y-m-d H:i:s",$log_row['time']) ?>
            </td>
            <td>
                <?php echo $log_row['ip']; ?>
            </td>
        </tr>
        <?php } ?>
    </table>
</div>
<?php include('bottom.php'); ?>